<template>
  <view>
    <view class="useritem" @click="itemtap">
      <view class="u-flex">
        <view class="iconfont" :class="[icon.value]"></view>
        <view style="flex: 1">
          <view>
            {{ item.sjc }}
            <text v-if="item.sjc">(退款)</text>
          </view>
          <view style="color: #969696">
            {{ item.mc }}&nbsp;&nbsp;&nbsp;{{ $t("通道") }}：{{ item.td }}
          </view>
        </view>
      </view>
      <view>{{ item.je / 100 }}元</view>
    </view>
    <ddxq ref="ddxq"></ddxq>
  </view>
</template>
<script>
  import ddxq from "./ddxq.vue";
  export default {
    components: {
      ddxq,
    },
    props: {
      item: {
        type: Object,
        default: () => {
          return {};
        },
      },
    },
    data() {
      return {};
    },
    computed: {
      icon() {
        const cdtype = this.$z.defaultValue.cdtype.find(
          (e) => e.value == this.item.type
        );
        if (String(this.item.uUser).includes("appuser")) {
          return { value: "iconchongdianzhuang2", type: "icon" };
        }
        return cdtype ? { value: cdtype.icon, type: "icon" } : { value: "" };
      },
      tagtext() {
        let r = this.$z.defaultValue.utype.find((e) => {
          return e.value == this.item.utype;
        });
        return r ? r.label : this.item.utype;
      },
    },
    methods: {
      itemtap() {
        this.$refs.ddxq.init(this.item);
      },
    },
  };
</script>

<style lang="scss" scoped>
  .useritem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 48rpx;
    min-height: 80rpx;
    padding: 20rpx 30rpx;
    position: relative;
    .iconfont {
      width: 80rpx;
      height: 80rpx;
      font-size: 60rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #2093f5;
      margin-right: 16rpx;
    }
    &::after {
      content: "";
      position: absolute;
      left: 30rpx;
      right: 0;
      bottom: 0;
      height: 2rpx;
      background: #eee;
    }
  }
</style>
